(function () {
    'use strict';

    angular.module('BlurAdmin.pages.class')
        .service('ClassModel', ClassModel);

    function ClassModel($http,API,$resource) {
        this.actions = {}

        this.actions.classInfo = {
            method: 'GET',
            url: API + '/class/findClassInfo'
        }

        this.actions.getClassList = {
            method: 'POST',
            url: API + '/class/getClassList'
        }

        this.actions.getClassTeacher = {
            method: 'GET',
            url: API + '/class/getClassTeacher'
        }

        this.actions.updateClassDetails = {
            method: 'POST',
            url: API + '/class/updateClassDetails'
        }

        this.actions.getStudentList = {
            method: 'POST',
            url: API + '/class/getStudentList'
        }

        this.actions.queryStudent = {
            method: 'POST',
            url: API + '/member/queryStudent'
        }

        this.actions.queryTeacher = {
            method: 'POST',
            url: API + '/member/queryTeacher'
        }

        this.actions.getStudentClass = {
            method: 'POST',
            url: API + '/member/getStudentClass'
        }

        this.actions.insertStudentClass = {
            method: 'POST',
            url: API + '/member/insertStudentClass'
        }

        this.actions.deleteStudent = {
            method: 'GET',
            url: API + '/member/deleteStudent'
        }

        return $resource.call(this, this.url, this.params, this.actions)
    }

})();
